#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @project: fastapi-common
# @Author : luzhiheng
# @Date : 2020/10/23
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from fastapi_common.core.config import settings

engine = create_engine(settings.SQLALCHEMY_DATABASE_URI, pool_pre_ping=True, echo=True)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)